<template>
	<view class="contentBox">
		<u-navbar title="" height="120upx">
			<view class="u-nav-slot" slot="left">
				<view @tap="back" class="icon-left">
					<u-icon name="arrow-left" color="#fff" size="26"></u-icon>
				</view>
			</view>
			<view class="u-nav-slot logoBox" slot="center">
				<view class="navBox">账户类型</view>
			</view>
			<view class="u-nav-slot" slot="right">
				<view class="icon-right"></view>
			</view>
		</u-navbar>
		
		<view class="main">
			<view class="title">请选择账户类型</view>
			<view class="typeBox">
				<view class="type">
					<image src="../../static/user/type2.png" mode="widthFix"></image>
					<u-radio-group size="30upx" activeColor="#2c1769" v-model="userType">
						<u-radio shape="circle" :name="1" :label="1" label="个人账户"></u-radio>
					</u-radio-group>
				</view>
				<view class="type">
					<image src="../../static/user/type1.png" mode="widthFix"></image>
					<u-radio-group size="30upx" activeColor="#2c1769" v-model="userType">
						<u-radio shape="circle" :name="0" :label="0" label="企业账户"></u-radio>
					</u-radio-group>
				</view>
			</view>
		</view>
		<view class="btn">
			<text @tap="navTo">下一步</text>
		</view>
	</view>
</template>

<script>
	export default {
		data(){
			return {
				userType:1
			}
		},
		methods:{
			navTo(cur){
				uni.navigateTo({
					url:"/pages/openAccount/index?type="+this.userType
				});
			},
			back(){
				let canNavBack = getCurrentPages();
				if(canNavBack && canNavBack.length>1) {  
				    uni.navigateBack({  
				      delta: 1  
				    });  
				} else {  
				    history.back();  
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.contentBox{
		padding-top: 120upx;
		background-color: #fff;
		min-height: 100vh;
		.btn{
			position: fixed;
			bottom: 0upx;
			left: 0;
			width: 100%;
			text-align: center;
			padding:100upx 58upx;
			background-color: #fff;
			text{
				display: block;
				height: 100%;
				color: #fff;
				width: 100%;
				background-color: #2c1769;
				font-size: 30upx;
				line-height: 100upx;
			}
		}
		.main{
			.typeBox{
				display: flex;
				justify-content: space-between;
				align-items: center;
				padding: 0 114upx;
				.type{
					text-align: center;
					image{
						width: 148upx;
						margin-bottom: 50upx;
					}
				}
			}
			.title{
				padding-top: 160upx;
				padding-bottom: 138upx;
				text-align: center;
				font-size: 36upx;
				color: #333;
				font-weight: bold;
			}
		}
		.logoBox{
			width: 100%;
			height: 100%;
			.navBox{
				height: 120upx;
				background-image: url("@/static/common/bg1.png");
				background-size: 100% 100%;
				background-repeat: no-repeat;
				display: flex;
				align-items: center;
				justify-content: center;
				color: #fff;
			}
		}
		
	}
</style>
